home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d19
/
ckit15a.arc
/
CKIT.DOC
< prev
next >
Wrap
Text File
|
1990-08-13
|
102KB
|
2,707 lines
CKIT DOOR building Toolkit Library
Version 1.5
Reference Manual
Distributed By
Data-Comp Information Systems
P.O. Box 5895
Maryville, Tenn. 37802-5895
(615) 982-8723 (Hayes Ultra V.32)
(615) 982-6537
(615) 970-7418 (Hayes V) (private line)
Copyright (c) 1990 Rickie W. Belitz
Introduction
Introduction
CKIT Library is an extensive library of C runtime routines that
allow easy door program implementation using PCBoard 12.0 through
14.x, GAP BBS and other doors using standard door.sys file.
Some of CKIT Library's features include interrupt driven I/O,
16550AN UART support,provides information available from the
PCBoard .sys files, database files, multi-node support (file sharing),
local sysop function keys and many more utilities are included
for the door author.
The CKIT Library routines are written in both assembly language
and MSC and can be used with Microsoft C, and Microsoft QuickC and
TURBO C.
CKIT Library supports the small, and medium models.
Microsoft is a registered trademark, and QuickC is a trademark of
the Microsoft Corporation.
TURBO C is a registered trademark of Borland International Inc.
PCBoard is a registered trademark of Clark Development Company.
Registration
The unregistered library will display "Unregistered copy" as part of
the signoff message. The registered version eliminates this signoff
msg at the time the door is closed. Please see the registration
information below. A lot of effort has gone into CKIT, to make sure
it would operate reliably and with little effort on the part of the
door author.
CKIT is being distributed as shareware.
The registration includes:
∙ A disk with the latest version of CKIT, registered to you.
∙ Self-Registration program for future releases of CKIT
∙ Technical support via electronic mail
For information see the addresses, phone numbers listed at the end
of this document.
Global Variables
Global Variables
The CKIT Library defines a number of variables in the ckit.h
header file. Through proper use, these variables allow the
programmer to customize the CKIT Library functions to meet
particular application program's needs.
DUMP_USER
-------------------------------------------------------------------
Defined As: short DUMP_USER;
Description: This variable will be set if the user hangs up,
his/her time runs out, carrier is lost, or if the
sysop wants to return the user to the BBS system using
function key F8. You should check this flag in all
major loops in the door program.
FORCEOFFHOOK
-------------------------------------------------------------------
Defined As: short FORCEOFFHOOK
Description: This variable should be set to TRUE or FALSE in the
CKIT.H file. If this variable is TRUE, the modem
will be placed OFF-HOOK if carrier is dropped in the
door before returning to the system. If FORCEOFFHOOK
is false, the door will not take the modem off-hook.
See CKIT.H
USERFILE
-------------------------------------------------------------------
Defined As: short USERSFILE
Description: This variable should be set to TRUE or FALSE in the
CKIT.H file. If this variable is TRUE, CKIT will
open the Users file and those variables will be
available. If not, only the PCBOARD.SYS file will be
opened and the user information will not be available.
See CKIT.H.
option
------------------------------------------------------------------
Defined As: unsigned char option;
Description: This variable is set to indicate how the user was
logged off the system. There are 5 macro's in the
CKIT header file that describes each.
#define LOGOFF 0 Normal Logoff
#define NOCARRIER 1 Dropped carrier*
#define TIMEOUT 2 Keyboard timeout*
#define SYSOP_O 3 Sysop request*
#define SYSTEMTIME 4 System time expired*
* These are normally handled internally by CKIT
COMPATIBILITY Global Variables
display pcboard.sys
------------------------------------------------------------------
Defined As: short display;
Description: This variable is set to indicate the status of the
local BBS display.
file. TRUE/FALSE 0 = No, 1 = yes.
Useful with 12.0 - > 14.x pcboard.sys usage only
printer pcboard.sys
------------------------------------------------------------------
Defined As: short printer;
Description: This variable is set to indicate the status of the
BBS printer.
TRUE/FALSE 0 = No, 1 = yes.
Useful with 12.0 - > 14.x pcboard.sys usage only
pagebell pcboard.sys
------------------------------------------------------------------
Defined As: short pagebell;
Description: This variable is set to indicate the status of the
BBS pagebell.
TRUE/FALSE 0 = No, 1 = yes.
Useful with 12.0 - > 14.x pcboard.sys usage only
callalarm pcboard.sys
------------------------------------------------------------------
Defined As: short callalarm;
Description: This variable is set to indicate the status of the
BBS caller alarm.
TRUE/FALSE 0 = No, 1 = yes.
Useful with 12.0 - > 14.x pcboard.sys usage only
PCB12 pcboard.sys
------------------------------------------------------------------
Defined As: BYTE PCB12;
Description: This variable is set to indicate whether CKIT found
a PCBoard version 12.0 pcboard.sys file or not.
TRUE/FALSE 0 = No, 1 = yes.
Useful with 12.0 - > 14.x pcboard.sys usage only
graphics pcboard.sys door.sys
------------------------------------------------------------------
Defined As: short graphics;
Description: This variable is set to indicate the status of the
user graphics mode.
TRUE/FALSE 0 = No, 1 = yes.
error_connection pcboard.sys door.sys
------------------------------------------------------------------
Defined As: short error_connection;
Description: This variable is set to indicate the status of the
modem error_connection.
TRUE/FALSE 0 = No, 1 = yes.
COMPATIBILITY Global Variables
local pcboard.sys door.sys
------------------------------------------------------------------
Defined As: short local;
Description: This variable is set to indicate the status of the
local/remote operation of door.
TRUE/FALSE 0 = No, 1 = yes.
expert pcboard.sys door.sys
------------------------------------------------------------------
Defined As: short expert;
Description: This variable is set to indicate the status of the
expert/novice mode of user.
TRUE/FALSE 0 = No, 1 = yes.
event_active pcboard.sys
------------------------------------------------------------------
Defined As: short event_active;
Description: This variable is set to indicate the status of the
system event.
TRUE/FALSE 0 = No, 1 = yes.
Useful with 14.x pcboard.sys usage only
slide_event pcboard.sys
------------------------------------------------------------------
Defined As: short slide_event;
Description: This variable is set to indicate whether the system
event can be moved or not.
TRUE/FALSE 0 = No, 1 = yes.
Useful with 14.x pcboard.sys useage only
sysop_next pcboard.sys
------------------------------------------------------------------
Defined As: char sysop_next[2];
Description: This C string indicates the status of the
Sysop Next flag. N = sysop next, X = exit to system,
space = nothing pending.
Useful with 12.0 - > 14.x pcboard.sys usage only
netchat pcboard.sys
------------------------------------------------------------------
Defined As: char netchat[2];
Description: This C string indicates the status of the
the user's netchat. U = Unavailable,
A = available.
Useful with 12.0 - > 14.x pcboard.sys usage only
aport pcboard.sys door.sys
------------------------------------------------------------------
Defined As: char aport[2];
Description: This C string is an ASCII string of the com
port in use as determined.
See also port.
COMPATIBILITY Global Variables
bps_open pcboard.sys door.sys
------------------------------------------------------------------
Defined As: char bps_open[6];
Description: This C string is an ASCII string of the
BBS's DTE to modem baud rate.
Not available with PCBoard 12.0
baud_rate pcboard.sys door.sys
------------------------------------------------------------------
Defined As: char baud_rate[6];
Description: This C string is an ASCII string of the
callers baud rate.
firstname pcboard.sys door.sys
------------------------------------------------------------------
Defined As: char firstname[16];
Description: This C string is an ASCII string of the
caller first name.
password pcboard.sys door.sys
------------------------------------------------------------------
Defined As: char password[13];
Description: This C string is an ASCII string of the
caller password.
fullname pcboard.sys door.sys
------------------------------------------------------------------
defined As: char fullname[26];
Description: This C string is an ASCII string of the
caller fullname.
page_length pcboard.sys and door.sys
------------------------------------------------------------------
Defined As: BYTE page_length;
Description: Page length of user. This information is not
available with PCBoard 12.0 so there is a default
of 23. The door author can adjust as desired.
This is also used by display_file(). Setting to
0 equals continous. (NON-STOP).
language pcboard.sys
------------------------------------------------------------------
defined As: char language[5];
Description: This C string is an ASCII string of the
caller language.
Space = English
time_logged pcboard.sys door.sys
------------------------------------------------------------------
defined As: char time_logged[6];
Description: This C string is an ASCII string of the time
caller logged onto the BBS.
COMPATIBILITY Global Variables
event_time pcboard.sys door.sys
------------------------------------------------------------------
defined As: char event_time[6];
Description: This C string is an ASCII string of the
system event time of the BBS as HH:MM.
Not available with PCBoard 12.0
time_on pcboard.sys
------------------------------------------------------------------
Defined As: short time_on;
Description: This variable indicates the time in minutes
past midnight the user logged on.
prev_used pcboard.sys
------------------------------------------------------------------
Defined As: short prev_used;
Description: This variable indicates the time in minutes
used in previous calls today.
Not available with PCBoard 12.0
user_record pcboard.sys door.sys
------------------------------------------------------------------
Defined As: unsigned short user_record;
Description: This variable holds the user record number.
time_limit pcboard.sys
------------------------------------------------------------------
Defined As: short time_limit;
Description: This variable holds the user BBS system time limit
in minutes.
time_added pcboard.sys
------------------------------------------------------------------
Defined As: short time_added;
Description: This variable holds the Area user time added so
far in minutes.
min_left pcboard.sys door.sys
------------------------------------------------------------------
Defined As: short min_left;
Description: This variable holds the user time left on system.
port pcboard.sys door.sys
------------------------------------------------------------------
Defined As: short port;
Description: This variable holds the com port in use.
Equal to 0 if local mode.
COMPATIBILITY Global Variables
node pcboard.sys door.sys
------------------------------------------------------------------
Defined As: short node;
Description: This variable holds the node in use.
Equal to space if no network active.
Not available in PCBoard.12.0
*conferences door.sys
------------------------------------------------------------------
Defined As: char *conferences
Description: This a pointer to a string of conferences/forums
the user is registered in.
parity door.sys
------------------------------------------------------------------
Defined As: short parity;
Description: Represent the ASCII character of parity in use.
Note this NOT a string. It will either be ASCII
7 (0x37) or 8 (0x38).
current_conference; door.sys
------------------------------------------------------------------
Defined As: short current_conference;
Description: Conference number user just exited from to door.
caller_bday door.sys
------------------------------------------------------------------
Defined As: char caller_bday[8];
Description: String containing the callers birthday.
as MM/DD/YY. Not available with PCBoard systems.
main_dir door.sys
------------------------------------------------------------------
Defined As: char main_dir[15];
Description: String containing the path to the MAIN directory
wherever the users file is located.
gen_dir door.sys
------------------------------------------------------------------
Defined As: char gen_dir[15];
Description: String containing the path to the GEN directory.
sysop_name door.sys
------------------------------------------------------------------
Defined As: char sysop_name[15];
Description: String containing the sysop's first name.
sysop_alias door.sys
------------------------------------------------------------------
Defined As: char sysop_alias[15];
Description: String containing the sysop's alias name.
COMPATIBILITY Global Variables
ansi_NG door.sys
------------------------------------------------------------------
Defined As: short ansi_NG;
Description: ANSI supported and caller using NG mode.
TRUE/FALSE 0 = No, 1 = yes.
record_lock door.sys
------------------------------------------------------------------
Defined As: short record_lock;
Description: User record locking.
TRUE/FALSE 0 = No, 1 = yes.
default_color door.sys
------------------------------------------------------------------
Defined As: char default_color[2];
Description: String containing system's default color
last_file_scan door.sys
------------------------------------------------------------------
Defined As: char last_file_scan[9];
Description: String containing user last new files scan as
MM/DD/YY.
daily_files door.sys
------------------------------------------------------------------
Defined As: char daily_files[4];
Description: String containing number of files user has download
so far today.
total_doors door.sys
------------------------------------------------------------------
Defined As: char total_doors[4];
Description: String containing number of doors user has opened.
msgs_left door.sys
------------------------------------------------------------------
Defined As: char msgs_left[4];
Description: String containing total number of messages left by
user.
max_files door.sys
------------------------------------------------------------------
Defined As: char max_files[4];
Description: String containing Max. number of files allowed.
upload_Kbytes door.sys
------------------------------------------------------------------
Defined As: char upload_Kbyte[10];
Description: String containing total "K" bytes uploaded.
download_Kbytes door.sys
------------------------------------------------------------------
Defined As: char download_Kbyte[10];
Description: String containing total "K" bytes downloaded.
dload_total door.sys
------------------------------------------------------------------
Defined As: char dload_total[5];
Description: String containing total files downloaded.
upload_total door.sys
------------------------------------------------------------------
Defined As: char upload_total[5];
Description: String containing total files uploaded.
Global Variables
These are part of the structure "user" as defined in the
CKIT.H file. All these user structure members are available
only if the door author specifies USERFILES True (see above)
and the system is PCBoard version 14.x. Some but not all
members are available if the author specifies USERFILE True
and used with Pcboard version 12.0. If the door author
does not specify USERFILE's file True and the door is
using DOOR.SYS some members of the structure are also available.
Each member is marked whether if it is available with door.sys
and/or PCBoard version 12.0.
user.name See also _fullname PCBoard 12.0
------------------------------------------------------------------
Defined As: char user.name[26];
Description: This C string is an ASCII string of the
caller fullname as determined from user record.
user.city door.sys and PCBoard 12.0
------------------------------------------------------------------
Defined As: char user.city[25];
Description: This C string is an ASCII string of the
caller city, state as determined from user record.
user.pwrd door.sys and PCBoard 12.0
------------------------------------------------------------------
Defined As: char user.pwrd[13];
Description: This C string is an ASCII string of the
caller password as determined from user record.
user.bphone door.sys and PCBoard 12.0
------------------------------------------------------------------
Defined As: char user.bphone[14];
Description: This C string is an ASCII string of the caller
business phone number as determined from user record.
user.phone door.sys and PCBoard 12.0
------------------------------------------------------------------
Defined As: char user.phone[14];
Description: This C string is an ASCII string of the caller
home phone number as determined from user record.
user.last_date door.sys and PCBoard 12.0
------------------------------------------------------------------
Defined As: char user.last_date[7];
Description: This C string is an ASCII string of the caller
last date on system as determined from user record.
Format is YYMMDD
user.last_time door.sys and PCBoard 12.0
------------------------------------------------------------------
Defined As: char user.last_time[6];
Description: This C string is an ASCII string of the caller
last time on system as determined from user record.
Format is HH:MM
Global Variables
These are part of the structure "user" as defined in the
CKIT.H file. Information available from user file.
user.expert See also _expert above PCBoard 12.0
------------------------------------------------------------------
Defined As: char user.expert[2];
Description: This C string is an ASCII string of the caller
expert mode ( Y or N )
user.protocol door.sys and PCBoard 12.0
------------------------------------------------------------------
Defined As: char user.protocol[2];
Description: This C string is an ASCII string of the caller
protocol type in effect.
user.filedate see also _last_file_scan
------------------------------------------------------------------
Defined As: char user.filedate[7];
Description: This C string is an ASCII string of the caller
last DIR scan. in YYMMDD format
user.security door.sys
------------------------------------------------------------------
Defined As: BYTE user.security;
Description: This variable holds the user security level as
determined from USER file.
user.total_calls
------------------------------------------------------------------
Defined As: short user.total_calls;
Description: This variable holds the user total calls on system
determined from USER file.
user.page_length see also _page_length door.sys
------------------------------------------------------------------
Defined As: BYTE user.page_length;
Description: This variable holds the user page setting as
determined from USER file.
user.uploads see also _upload_total
------------------------------------------------------------------
Defined As: long user.uploads;
Description: This variable holds the user total uploads as
determined from USER file.
user.dloads see also _dload_total
------------------------------------------------------------------
Defined As: long user.dloads;
Description: This variable holds the user total downloads as
determined from USER file.
Global Variables
These are part of the structure "user" as defined in the
CKIT.H file. Information available from user file.
user.comment1
------------------------------------------------------------------
Defined As: char user.comment1[31];
Description: This C string is an ASCII string of the caller
user maintained comment.
user.comment2 door.sys
------------------------------------------------------------------
Defined As: char user.comment2[32];
Description: This C string is an ASCII string of the caller
sysop maintained comment.
user.expire_date door.sys
------------------------------------------------------------------
Defined As: char user.expire_date[7];
Description: This C string is an ASCII string of the caller
expiration date in YYMMDD format.
user.delete_user
------------------------------------------------------------------
Defined As: char user.delete_user[2];
Description: This C string is an ASCII string of delete
user flag. (Y or N)
user.time_used
------------------------------------------------------------------
Defined As: short user.time_used;
Description: Elapsed time on system. (minutes)
Global Variables
char progname[]
------------------------------------------------------------------
Defined as: char prognam[21];
Description: Set this to your Door program name. It will be
display on the status line on the sysop screen.
MAXIMUM length is 20 characters! Do not exceed this!
system_time_HHMMSS[]
------------------------------------------------------------------
Defined as: char system_time_HHMMSS[9];
Description: This string will contain the current system time
in the form HH:MM:SS and is available for general use.
system_date_MMDDYY[]
------------------------------------------------------------------
Defined as: char todays_date_MMDDYY[9];
Description: This string will contain the current system date
in the form MM:DD:YY and is available for general use.
cmdline[]
------------------------------------------------------------------
Defined as: BYTE cmdline[128]
Description: This is used by get_cmdline(), to read the user
keyboard input to.
Please see the CKITDEMO.C for usage.
par[]
------------------------------------------------------------------
Defined as: char par[128];
Description: This is used by get_nextpar(), to parse stacked
commands to.
Please see CKITDEMO.C for usage.
Standard Data Types
Standard Data Types
CKIT defines a number of useful data types.
BYTE
-------------------------------------------------------------------
Defined As: typedef unsigned char BYTE;
Description: The BYTE data type is useful in serial communications
since it provides an easy way of handling 8 bit data
from UART.
Functions
Functions
The CKIT Library contains a variety of functions.
They are described as follows:
Summary: Presents an exact syntactic model for each of the
CKIT Library functions.
Description: Describes a function's purpose and how it is used in
an application program.
Return Value: Explains any of the possible return values for an
CKIT Library function.
See Also: Lists any similar or related CKIT Library function.
Example: Illustrates how an CKIT Library function could
actually be used in an application program.
Functions
open_door
-------------------------------------------------------------------
Summary: #include "ckit.h"
void open_door(void);
Description: The open door function initializes vectors,
reads pcboard information.
THIS MUST BE CALLED FIRST!
Close_door MUST be called before exiting program
after a call to open_door.
Return Value: No value is returned.
See Also: close_door.
Example:
#include "ckit.h"
main()
{
open_door();
}
Functions
close_door
-------------------------------------------------------------------
Summary: #include "ckit.h"
void close_door(void);
Description: The close door function resets vectors,
closes files opened.
THIS MUST BE CALLED LAST!
Close_door MUST be called before exiting program
after a call has been made to open_door.
Return Value: No value is returned.
See Also: open_door.
Example:
#include "ckit.h"
main()
{
close_door();
}
Functions
s_puts
-------------------------------------------------------------------
Summary: #include "ckit.h"
void s_puts(char *);
Description: The s_puts function displays a single NULL termintated
(C string) to the local and remote console. It expects
a pointer to the string of type BYTE or char
to be displayed.
Return Value: No value is returned.
See Also: s_putv, s_putc, s_putsn, s_putstd
Example: Two examples, both different useage of the string pointer.
#include "ckit.h"
main()
{
static BYTE string[] = "This is a test";
s_puts(string);
s_puts("This is also a test");
}
Functions
s_putstd
-------------------------------------------------------------------
Summary: #include "ckit.h"
void s_putstd(char *);
Description: The s_putstd function displays a single NULL termintated
(C string) to the local and remote console. It expects
a pointer to the string of type BYTE or char
to be displayed. This function is identical to s_puts
except it uses std output.
Return Value: No value is returned.
See Also: s_putv, s_putc, s_putsn
Example: Two examples, both different useage of the string pointer.
#include "ckit.h"
main()
{
static BYTE string[] = "This is a test";
s_puts(string);
s_puts("This is also a test");
}
Functions
s_putv
-------------------------------------------------------------------
Summary: #include "ckit.h"
void s_putv();
Description: The s_putv function displays a single NULL terminated
(C string) to the local and remote console. It expects
a variable argument of pointer(s) to the string(s)
of type BYTE or char to be displayed. The list of
pointers MUST end with a NULL pointer!.
Return Value: No value is returned.
See Also: s_puts, s_putc, s_putsn
Example: This example prints 2 strings with the pointer list
terminated with a NULL pointer.
#include "ckit.h"
main()
{
static BYTE string[] = "This is a test";
s_putv(string, "This is also a test", NULL);
}
Functions
s_putsn
-------------------------------------------------------------------
Summary: #include "ckit.h"
void s_putsn(char *);
Description: The s_putsn function displays a single NULL terminated
(C string) to the local console only. It expects
a pointer to the string of type BYTE or char
to be displayed.
Return Value: No value is returned.
See Also: s_putv, s_putc.
Example: Two examples, both different useage of the string pointer.
#include "ckit.h"
main()
{
static BYTE string[] = "This is a test";
s_putsn(string);
s_putsn("This is also a test");
}
Functions
s_putc
-------------------------------------------------------------------
Summary: #include "ckit.h"
void s_putc(BYTE);
Description: The s_putc function displays a single BYTE or char
to the local and remote console.
Return Value: No value is returned.
See Also: s_puts, s_putc.
Example: This example prints single BYTE (ASCII D) to local
and remote console.
#include "ckit.h"
main()
BYTE byte_to_send = 'D';
{
s_putc(byte_to_send);
}
Functions
newline
-------------------------------------------------------------------
Summary: #include "ckit.h"
void newline(void);
Description: The newline function sends a Carriage Return/Line Feed
to the local and remote console.
Return Value: No value is returned.
See Also: s_puts, s_putc.
Example: This example prints single CR/LF to local
and remote console.
#include "ckit.h"
main()
{
newline();
}
Functions
clear_row
-------------------------------------------------------------------
Summary: #include "ckit.h"
void clear_row(short);
Description: The clear_row function clears a given row on screen
of the local and remote console. (row = 0 - 24).
Used only if caller is in GRAPHICS mode. (ANSI)
Return Value: No value is returned.
See Also: clear_eol, clr_screen.
Example: This example clears single row on screen of local
and remote console.
#include "ckit.h"
main()
short row = 10;
{
clear_row(row);
}
Functions
clear_eol
-------------------------------------------------------------------
Summary: #include "ckit.h"
void clear_eol(void);
Description: The clear_eol function clears to the end of line
from current cursor position.
Used only if caller is in GRAPHICS mode. (ANSI)
Return Value: No value is returned.
See Also: clear_eol, clr_screen.
Example: This example clears to end of line on screen of
local and remote console.
#include "ckit.h"
main()
{
clear_eol();
}
Functions
clr_screen
-------------------------------------------------------------------
Summary: #include "ckit.h"
void clr_screen(void);
Description: The clr_screen function clears entire screen of local
and remote console.
Return Value: No value is returned.
See Also: clear_screen.
Example: This example clears screen of local/remote console.
#include "ckit.h"
main()
{
clr_screen();
}
Functions
clear_screen
-------------------------------------------------------------------
Summary: #include "ckit.h"
void clear_screen(void);
Description: The clear_screen function clears entire screen of
local console including status line.
Return Value: No value is returned.
See Also: clr_screen.
Example: This example clears screen of local console.
#include "ckit.h"
main()
{
clear_screen();
}
Functions
pos_cursor
-------------------------------------------------------------------
Summary: #include "ckit.h"
void pos_cursor(short, short);
Description: The pos_cursor function positions cursor at
row, column using ANSI (caller must be in GRAPHICS,
if not no action will take place)
row = 1 to 25, column = 1 to 80.
Return Value: No value is returned.
Example: This example positions cursor at row 10, column 15
on the local/remote consoles.
#include "ckit.h"
short row = 10;
short column = 15;
main()
{
pos_cursor(row, column);
}
Functions
set_r_c
-------------------------------------------------------------------
Summary: #include "ckit.h"
void set_r_c(short, short);
Description: The set_r_c function positions cursor at
row, column BIOS on the local screen.
row = 1 to 25, column = 1 to 80.
Return Value: No value is returned.
Example: This example positions cursor at row 10, column 15
on the local/remote consoles.
#include "ckit.h"
short row = 10;
short column = 15;
main()
{
set_r_c(row, column);
}
Functions
back_space
-------------------------------------------------------------------
Summary: #include "ckit.h"
void back_space(short);
Description: The back_space function backspaces cursor short number
of spaces or to the 1st char in row, whichever is 1st.
Return Value: No value is returned.
Example: This example backspaces cursor 5 places on the
local/remote consoles.
#include "ckit.h"
main {
open_door();
.
.
.
back_space(bspace);
.
.
.
close_door();
}
Functions
color
-------------------------------------------------------------------
Summary: #include "ckit.h"
void color(short);
Description: The color function selects color to use using ANSI.
Caller must be in graphics mode. If not, no action
is taken.
Return Value: No value is returned.
See Also: Color macros above in macro section used with CKIT
Example: This example sets color to red (see color macros
above) on the local/remote consoles.
#include "ckit.h"
#include "ckit.h"
main {
open_door();
.
.
.
color(red);
.
.
.
close_door();
}
Functions
input
-------------------------------------------------------------------
Summary: #include "ckit.h"
void input(BYTE *, short);
Description: Read a line of input with specified length. Echo to
screen, leave cursor after the last key typed before
C/R. Automatically checks for time_left, carrier.
Expects a char array pointer to store input and max.
length of input to read. NOTE: Each call to input()
will purge the buffer in use to NULLS.
Return Value: No value is returned.
See Also: inkey, getkey, sio_getbyte.
Example: This example reads keyboard input from local/remote
console into array usr_input[] with max. bytes to
read equal to 100 bytes.
#include "ckit.h"
BYTE usr_input[128];
short max_bytes = 100;
main {
open_door();
.
.
.
input(&usr_input[0], max_bytes);
.
.
.
close_door();
}
Functions
get_cmdline
-------------------------------------------------------------------
Summary: #include "ckit.h"
void get_cmdline(void);
Description: Calls input() and reads into array cmdline*,
automatically maps input to Uppercase.
*defined in CKIT.H
Return Value: No value is returned.
See Also: input, get_nextpar.
Example: This example reads keyboard from local/remote
console into array get_cmdline[]
#include "ckit.h"
main {
open_door();
.
.
.
s_puts("Input file_name to view: ");
get_cmdline();
.
.
.
close_door();
}
Functions
get_cmdline_raw
-------------------------------------------------------------------
Summary: #include "ckit.h"
void get_cmdline_raw(short);
Description: Same is get_cmdline() above but erases prompt of
prelength.
Return Value: No value is returned.
See Also: input, get_nextpar, get_cmdline.
Example: This example reads keyboard from local/remote
console into array cmdline[]
#include "ckit.h"
main {
open_door();
.
.
.
s_puts("Input file_name to view: ");
get_cmdline_raw(prelength);
.
.
.
close_door();
}
Functions
get_nextpar
-------------------------------------------------------------------
Summary: #include "ckit.h"
char get_nextpar(void);
Description: Scans next from cmdline[] array into "par[]".
par defined in CKIT.H
Return Value: Returns 0 if none available, non-zero if cmd available
See Also: input, get_cmdline, cmdline and par in GLOBAL section.
Example: This example reads keyboard from local/remote
console into array get_cmdline[], then calls
get_nextpar to scan for cmds entered.
#include "ckit.h"
main() {
do {
get_cmdline(); /* read input into 'cmdline' */
} while( (DUMP_USER != TRUE) && ( strlen(cmdline) == 0 ));
if (get_nextpar()) { /* scan next parameter from cmdline into par */
/* process commands */
switch ( par[0] ) {
case 'A':
ansi_demo();
break;
default:
break;
}
}
}
Functions
nomore
-------------------------------------------------------------------
Summary: #include "ckit.h"
short nomore(void);
Description: Displays prompt
"More: (Enter) or (Y)es, (N)o, (NS)nonstop? ".
Returns 0 = Non_stop
1 = Yes
2 = No
Also checks for CTRL K.
Return Value: short value, meaning described above/
See Also: get_def, get_defyn, get_defen
Example: This example checks for A at the keyboard,
from local/remote console, returns TRUE or FALSE
#include "ckit.h"
Functions
getdefyn
-------------------------------------------------------------------
Summary: #include "ckit.h"
void get_defyn(char *, short)
Description: Displays prompt string and either
"Enter=yes " or "Enter=no" based on short value.
If short is Non_zero it will display "Enter=Yes".
If short is Zero (NULL) it will display "Enter=No".
Calls get_cmdline for user input.
Return Value: None
See Also: cmd_line, get_def, get_defyn, get_defen
Functions
getdefen
-------------------------------------------------------------------
Summary: #include "ckit.h"
void get_defyn(char *, short)
Description: Same as get_defyn except default will always be
"Enter=none? ".
Calls get_cmdline for user input.
Return Value: None
See Also: cmd_line, get_def, get_defyn, get_defen
Functions
getdef
-------------------------------------------------------------------
Summary: #include "ckit.h"
void get_def(char *, char *)
Description: Same as get_defen except default prompt is user
defineable
Calls get_cmdline for user input.
Return Value: None
See Also: cmd_line, get_def, get_defyn, get_defen
Example: get_def("Enter filename: ", "Enter = quit)";
Functions
prompt_def
-------------------------------------------------------------------
Summary: #include "ckit.h"
void prompt_def(char *, char *def)
Description: Same as get_def except it does not call
get_cmdline.
Return Value: None
See Also: cmd_line, get_def, get_defyn, get_defen
Example: prompt_def("Enter filename: ", "Enter = quit)";
Functions
getdefn
-------------------------------------------------------------------
Summary: #include "ckit.h"
void get_defn(char *, char *)
Description: Same as get_def except appends "Enter=none" to end.
Calls get_cmdline for user input.
Return Value: None
See Also: cmd_line, get_def, get_defyn, get_defen
Functions
inkey
-------------------------------------------------------------------
Summary: #include "ckit.h"
size_t inkey(void);
Description: Read character (if available) from local/remote
console. Does not wait for input. Also sets
key_source equal to SYSOP or USER_KEY
Return Value: Returns 0 if none available, otherwise returns key
pressed
See Also: input, sio_getbyte, key_source above in globals,
Example: This example checks for A at the keyboard,
from local/remote console, returns TRUE or FALSE
#include "ckit.h"
main {
open_door();
.
.
.
if ( inkey() != 'A') {
return(FALSE);
} else {
return(TRUE);
}
.
.
.
close_door();
}
Functions
keystat
-------------------------------------------------------------------
Summary: #include "ckit.h"
short keystat(void);
Description: Check if character is available from local console.
Does not wait for input.
Return Value: Returns 0 if none available. None zero if true.
See Also: input, r_count, key_source above in globals,
Example: This example checks for keypress at the keyboard
local console, returns TRUE or FALSE
#include "ckit.h"
main {
open_door();
.
.
.
if ( keystat() ) {
return(FALSE);
} else {
return(TRUE);
}
.
.
.
close_door();
}
Functions
r_count
-------------------------------------------------------------------
Summary: #include "ckit.h"
short r_count(void);
Description: Check if character is available from remote console.
Does not wait for input.
Return Value: Returns FALSE if none available. Zero if true.
See Also: input, r_count, keystat.
Example: See flush_rqueue below
Functions
getkey
-------------------------------------------------------------------
Summary: #include "ckit.h"
size_t getkey(void);
Description: Read character (if available) from local console.
Does not wait for input.
Return Value: Returns FALSE if none available. Zero if true.
See Also: input, getkey, keystat.
Example: This example read key from local console buffer.
#include "ckit.h"
size_t ch;
ch = getkey();
Functions
sio_getbyte
-------------------------------------------------------------------
Summary: #include "ckit.h"
BYTE sio_getbyte(void);
Description: Read character (if available) from local console.
Does not wait for input.
Return Value: Returns FALSE if none available. Zero if true.
See Also: input, sio_getbyte, keystat.
Example: This example read byte from remote console buffer.
#include "ckit.h
BYTE ch;
ch = sio_getbyte();
Functions
force_enter
-------------------------------------------------------------------
Summary: #include "ckit.h"
void force_enter(void);
Description: Prompts " Press Enter to continue: ", wait for C/R,
automatic carrier, time_left and sysop checks.
Return Value: NONE
Example: This example displays a string then prompts and
forces user to press C/R to continue.
#include "ckit.h"
main {
short filehandle;
open_door();
.
.
.
color(yellow);
s_puts("Display this string\r\n");
force_enter();
.
.
.
close_door();
}
Functions
display_file
-------------------------------------------------------------------
Summary: #include "ckit.h"
short display_file(char *);
Description: Displays file to local/remote consoles. Automatic
use of page_length, control K checks, MORE? prompting,
closes file when done. Expects a pointer to name/path
of file to display. If page_length is 0, the
MORE? prompting will be disabled. You can use this
to your advantage for files that you do not want
MORE? prompting by setting user.page_length to 0 before
calling display_file(). Just make sure you save the
original value of user.page_length if you need it later
on. This function will not automatically attempt to
display a graphic file if the user is in graphics.
It is up to the door author to decide how he wants
to handle it. see below.
Return Value: Returns non-zero if error. If desired, you can then
check the C global _errno for the cause of the problem.
See Also: NONE
Example: This example displays the file ckit.m, then forces
user to press enter when done.
#include "ckit.h"
char filename[13];
main {
short filehandle;
open_door();
.
.
.
strcpy(filename, "ckit.m")
if(!graphics) {
(display_file(filename);
} else {
strcat(filename,"g");
(display_file(filename);
}
force_enter();
.
.
.
close_door();
}
Functions
get_time
-------------------------------------------------------------------
Summary: #include "ckit.h"
size_t get_time(void);
Description: Returns number of seconds past midnight.
Return Value: seconds
See Also: display_time, check_time_left.
Example: Set secs_past_mid using get_time();
#include "ckit.h"
main {
open_door();
.
.
.
size_t secs_past_mid;
secs_past_mid = get_time();
.
.
.
close_door();
}
Functions
check_time_left
-------------------------------------------------------------------
Summary: #include "ckit.h"
void check_time_left(void);
Description: Checks time left on system, automatically sets
DUMP_USER if time expired. Should be included
in all major program loops.
Return Value: NONE
See Also: display_time
Example: This function is normally handled internally by CKIT.
Functions
display_time
-------------------------------------------------------------------
Summary: #include "ckit.h"
void display_time(void);
Description: Displays (xxxx used, xxx left)
Return Value: NONE
See Also:
Example: See CKITDEMO.C also
newline();
do {
/* display_time_left; */
display_time();
color(green);
s_puts("Command? ", NULL);
get_cmdline(); /* read input into 'cmdline' */
newline();
} while( (DUMP_USER != TRUE) && ( strlen(cmdline) == 0 ));
}
Functions
event_minutes
-------------------------------------------------------------------
Summary: #include "ckit.h"
short event_minutes(void);
Description: Checks minutes past midnight event is scheduled.
Return Value: Number of minutes past midnight event is scheduled
to run.
See Also: check_event, mins_before_event.
#include "ckit.h"
main {
open_door();
.
.
short event_mins;
event_mins = event_minutes();
.
.
.
close_door();
}
Functions
check_event
-------------------------------------------------------------------
Summary: #include "ckit.h"
short check_event(void);
Description: Checks if time left will conflict with event.
Return Value: 0 if no conflict, otherwise it will return the new
minutes left before event.
See Also: event_minutes, mins_before_event.
Functions
mins_before_event
-------------------------------------------------------------------
Summary: #include "ckit.h"
short mins_before_event(void);
Description: Check minutes left before event from current time.
Return Value: Minutes before event from current time.
See Also: check_event, event_minutes.
Example:
#include "ckit.h"
main {
open_door();
.
.
short mins_before_event;
mins_before_event = mins_before_event();
.
.
.
close_door();
}
Functions
adjust_time_allowed
-------------------------------------------------------------------
Summary: #include "ckit.h"
void adjust_time_allowed(short);
Description: Adjust user time left on system. Automatically
updates PCBoard.sys to reflect change.
Return Value: NONE
See Also:
Example: For complete example see CKITDEMO.C included
if (get_nextpar()) { /* scan next parameter from cmdline into par */
if (!strcmpi(thinking_of, par)) {
color(green);
s_puts("That's right! You get a 10 minute bonus!");
adjust_time_allowed(10);
} else {
color(blue);
s_putv("Wrong! You lose 2 minutes! \
I was thinking of ", thinking_of,".",NULL);
adjust_time_allowed(-2);
}
}
}
Functions
lower_dtr
-------------------------------------------------------------------
Summary: #include "ckit.h"
void lower_dtr(void);
Description: Drops DTR on com port, causing modem to hang up.
Return Value: NONE
See Also: raise_dtr, transmit_modem, transmit_data
Example:
see transmit_modem below
Functions
raise_dtr
-------------------------------------------------------------------
Summary: #include "ckit.h"
void raise_dtr(void);
Description: Drops DTR on com port, causing modem to hang up.
Return Value: NONE
See Also: lower_dtr, transmit_modem, transmit_data
Example:
see transmit_modem below
Functions
force_offhook
-------------------------------------------------------------------
Summary: #include "ckit.h"
void force_offhook(void);
Description: Drops DTR on com port, causing modem to hang up,
tells modem to go back offhook
Return Value: NONE
See Also:
Example:
#include "ckit.h"
static char message[] = "ATZ";
main {
open_door();
.
.
if(NO_CARRIER) {
force_offhook();
transmit_data(message);
}
.
.
.
close_door();
}
Functions
transmit_data
-------------------------------------------------------------------
Summary: #include "ckit.h"
void transmit_data(BYTE *);
Description: Send C string to remote console.
No echo to local console. Expects a pointer to either
a NULL terminate C string of type BYTE or char.
Check for carrier included.
Return Value: NONE
See Also: transmit_modem
Example:
#include "ckit.h"
static char message[] = "String to send";
main {
open_door();
.
.
.
transmit_data(message);
.
.
.
close_door();
}
transmit_modem
-------------------------------------------------------------------
Summary: #include "ckit.h"
void transmit_modem(BYTE *);
Description: Send C string to modem/remote.
No echo to local console. Expects a pointer to either
a NULL terminate C string of type BYTE or char.
NO carrier checking is included.
Return Value: NONE
See Also: transmit_data
Example:
#include "ckit.h"
static char message[] = "ATZ";
main {
open_door();
.
.
lower_dtr(); /* Drop DTR on modem */
delay(1); /* wait a second */
raise_dtr(); /* raise DTR on modem */
transmit_modem(message);
.
.
.
close_door();
}
Functions
tqueue_len
-------------------------------------------------------------------
Summary: #include "ckit.h"
short tqueue_len(void);
Description: Check number of bytes left in Transmit RQUEUE.
Normally this routine is not needed but is available
if needed.
Return Value: Bytes left in XMIT QUEUE
See Also:
Example:
#include "ckit.h"
static char message[] = "String to send";
main {
open_door();
.
.
.
transmit_data(message);
while( !tqueue_len() );
.
.
.
close_door();
}
Functions
flush_RQUEUE
-------------------------------------------------------------------
Summary: #include "ckit.h"
void flush_RQUEUE(void);
Description: Flush bytes from Receive QUEUE buffer.
Return Value: NONE
See Also: r_count, tqueue_len
Example:
#include "ckit.h"
static char message[] = "ATH1";
main {
open_door();
.
.
.
flush_RQUEUE(); /* flush buffer */
transmit_modem(message);
while (r_count()); /* wait for response back */
.
.
.
close_door();
}
Functions
check_cd
-------------------------------------------------------------------
Summary: #include "ckit.h"
BYTE check_CD(void);
Description: Checks if carrier present. If present, returns
NON-zero. Zero (NULL) means no carrier present.
Return Value: BYTE indicator of carrier present/
See Also: DUMP_USER, transmit_data, transmit_modem
Functions
delay
-------------------------------------------------------------------
Summary: #include "ckit.h"
void delay(short);
Description: General purpose delay in milliseconds
Minumum of 55 ms. (short must be >= 1)
This function is good only on the MSC librarys.
The TURBO librarys use Borland's DELAY() function.
See also: Wait
Return Value: NONE
Functions
wait
-------------------------------------------------------------------
Summary: #include "ckit.h"
void wait(short);
Description: General purpose delay in seconds
Minumum of 1 sec. for now (short must be >= 1)
less than one will result in 1/2 second delay.
Use delay above
Return Value: NONE
See also: Delay
Functions
purge_buffer
-------------------------------------------------------------------
Summary: #include "ckit.h"
void purge_buffer(BYTE *, short);
Description: purge_buffer will purge any buffer to NULLS by
passing a pointer to the buffer and the size of the
buffer. i.e purge_buffer(buffer, 0x80).
This may or may not be useful but is available.
NOTE: There is a seperate purge function for the serial port
input buffer if you wish to purge it before calling input.
See flush_RQUEUE.
Return Value: NONE
See also: flush_RQUEUE
Functions
check_CR
-------------------------------------------------------------------
Summary: #include "ckit.h"
void short check_CR(void);
Description: Check for a carriage return, does not wait, does
not display any prompts.
Returns TRUE or FALSE
Return Value: TRUE, FALSE
See also: check_keypress(), input(), getkey()
Functions
check_keypress
-------------------------------------------------------------------
Summary: #include "ckit.h"
short check_keypress(BYTE);
Description: Check for any specific ASCII character entered.
Does not wait for a character.
This function may or may not be useful
but is available if needed for a "hot_key"
function in a door.
Return Value: TRUE, FALSE
See also: check_CR, input(), getkey()
Functions
dos_shell
-------------------------------------------------------------------
Summary: #include "ckit.h"
short dos_shell(char *);
Description: Will shell to program pointed to by character string.
If you plan on doing any shells, you need to use this
function since it will disable the keyboard timer
while the shell is taking place and perform some other
clean up's upon re-entry.
Return Value: Error level return by program called. NULL = NO error
See also: F5 local shell to DOS
Example:
#include "ckit.h"
main {
open_door();
.
.
.
dos_shell("dsz sz pB4096 ckit.doc");
.
.
.
close_door();
}
Functions
debug_on
-------------------------------------------------------------------
Summary: #include "ckit.h"
void debug_on(void);
Description: A call to this function while debugging your door
will disable the keyboard timer among other things
while you are trying to debug your door. Make
sure you remove this call before releasing your door
or the keyboard timeout will not function! It should
be called after open_door();
Return Value: NONE
Example:
#include "ckit.h"
main {
open_door();
debug_on();
.
.
.
close_door();
}
CKIT based DOOR programs have many of the feature available for the
door author, and for the sysop using standard PCBoard keys such as:
Function key
~~~~~~~~~~~~
F3 Toggle printer on/off
F4 Toggle pagebell on/off
F5 Shell to DOS
F7 Toggle caller alarm on/off
F8 Return user to system
F9 Toggle display on/off
Alternate key
~~~~~~~~~~~~~
ALT-N Toggle sysop on next
ALT-X Toggle exit to dos after call
ALT-H Toggle between different status lines
and help lines
Alternately pressing the ALT-H key will bring up
the next status line screen. The 1st screen is a help screen,
the second second screen shows your COM port status.
Command stacking is also available and can be easily disabled if desired.
See the CKITDEMO.C for example of disabling command stacking.
Files
~~~~~~~
CKIT.DOC - This file.
CKITDEMO.EXE - This is a very short written to test CKIT libraries
and for a short demo. CKITDEMO.EXE is a compiled program
using the CKIT library.
CKIT.H - This is a standard C header file, to be included with your
door program. This file contains all the function prototypes,
and variable names and types available from CKIT.
CKIT_MS.LIB - This file is the CKIT library file to access all of the CKIT
CKIT_MM.LIB files that are linked into your door program for MSC.
CKIT_TS.LIB - This file is the CKIT library file to access all of the CKIT
CKIT_TM.LIB files that are linked into your door program for TURBO C.
CKITDEMO.C - The source code for CKITDEMO demostrating a door written
using CKIT functions.
DEMO.BAT - Sample .bat file to compile and link using the CKIT.LIB
Provided as an example.
CKIT_TC.ZIP - Contains TURBO C files
TCREAD.ME - Information for TURBO C users
CKITDEMO.MAK - TURBO C Make file for CKITDEMO door (for use as example)
CKITS.PRJ - TURBO C Project file for CKITDEMO door (use as example)
ATTENTION TURBO C USERS: You must select WORD alignment when using
functions from the TURBO librarys. The default on BORLAND is BYTE
alignment. This will not work correctly. See the file TCREAD.ME
in the CKIT_TC.ZIP file.
This package can be freely distributed so long as it is not modified
or sold for profit. If you find that this program is valuable, you
can send me a donation for what you think it is worth. I suggest
at least $20.00. You will receive a program CKITREG.EXE. This
will register all future copies of CKIT with your registration number.
This means you would only have to download the new versions from your
favorite board, saving you long distance charges!
Send your contributions to:
Rickie W. Belitz
P.O. Box 5895
Maryville, TN 37802-5895
SUPPORT
~~~~~~~~~~~
If you have any questions, suggestions, or bug reports, contact me at:
Data-Comp BBS
(615) 982-8723 (HAYES ULTRA V.32)
(615) 982-6537 (2400)
(615) 970-7418 (HAYES V) (private line)
NOTE: The board has automatic rollover on the phone lines.
There is chance you could end up on the 970 private line
with limited time. (if not a registered user)
I can also be reached via mail networks thru INTELEC's SHAREWARE conference
and Relaynet's DOORS conference.
ACKNOWLEDGEMENTS
~~~~~~~~~~~~~~~~~~~~
I would like to give special thanks to my Co-sysop, Dean McGuire
who has patiently tested the door routines and for help preparing the
documentation.
COMPATIBILITY ISSUES
~~~~~~~~~~~~~~~~~~~~~~~~~~
Although CKIT makes a lot information available to the user, the author
has to decide on what particular information his or her door will require.
Here are some general guidelines that may help. Decide on exactly what
information your door will need to operate. Keeping this to a minimum
increases your chances of maintaining compatibility thruout the different
BBS's systems and versions thereof which CKIT supports.
For example, let's assume you are designing a standard BBS game. CKIT
handles all the detailed information such as time left etc. All you would
really need is some basic information. Perhaps the user's name, city, and
maybe expert on/off. By keeping this type of information to the minimum,
your door would work regardless of whether the sysop running your door used
pcboard.sys or door.sys on the command line..i.e, game.exe c:\pcb\pcboard.sys
OR game.exe c:\pcb\door.sys; either one would work. (If the sysop was run-
ning PCBoard 12.0, he would only be able to use pcboard.sys. In any case,
CKIT would not only take care of deciding if it was a pcboard.sys file or a
door.sys file, but also if it *is* a pcboard.sys file, whether it is a 12.0
sys file or later, and then would read it properly!) This would make your
door compatible with the full spectrum of PCBoard 12.0-14.5, GAP BBS and
other systems using the standard door.sys file with minimum effort on the
part of the sysop running your door. Once you've written this fantastic
new door, if it's a snap for a Sysop to install it, this might make him a
bit more inclined to register it, right?
Another senario would be if your door needs somewhat more than the basic
information. I would recommend using the variables available in door.sys
in this case. This would give you the broadest coverage for your door. If
you will notice in the variables descriptions in this manual, there is a
compatibility list to the right of each variable. This tells you which and
what type of information is available to you depending on whether your door
is used with door.sys or pcboard.sys. Below is a summary and quick guide to
each pcboard.sys version and door.sys, and which information variables are
available with each.
If you need EVEN more information, then you can tell CKIT to open the
users file and read information. Doing so, will limit your door to PCBoard
systems only. CKIT will NOT record any information to the user's file.
It is a read only function. You may also want to record new information
to the users file. CKIT has the capability of doing so and if you
need this, contact me and we can work something out. This is mainly for
safety reasons.
Compatible with...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
pcboard.sys pcboard.sys pcboard 14.5+
Variable 12.0 only 14.0 - 14.5 and door.sys
~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~ ~~~~~~~~~~~ ~~~~~~~~~~~~~
*conferences X
aport X X X
ansi_NG X
bps_open X X
baud_rate X X X
callalarm X X
current_conference X X X
caller_bday X
display X X
default_color X
daily_files X
download_Kbytes X
dload_total X X
error_connection X X X
expert X X X
event_active X
event_time X X
firstname X X X
fullname X X X
graphics X X X
gen_dir X
local X X X
language X X
last_file_scan X X X
min_left X X X
main_dir X
max_files X
msgs_left X
netchat X X
node X X
printer X X
pagebell X X
password X X X
page_length X X X
PCB X X X
PCB12 X X X
prev_used X
port X X X
parity X
record_lock X
slide_event X
sysop_next X X
sysop_name X
sysop_alias X
time_logged X X X
time_on X X
time_limit X X
time_added X X
total_doors X
user_record X X X
upload_Kbytes X
upload_total X X
One last note - There are two variables PCB12 and PCB. When CKIT reads
a pcboard.sys file, it will set the PCB variable TRUE. If the pcboard.sys
file it read was a 12.0 file, it will set the PCB12 variable true. This
may be useful in making adjustments to your program depending on which
pcboard.sys file was read and/or if a sysop was running 12.0 and you
normally expected door.sys.
Also, see the users file information earlier in the doc file.
Some of the users structure information is available even if you are just
using door.sys. IF you do tell CKIT to open the users file, all the users
file information above will be available if CKIT finds a version 14.x
pcboard.sys. If it finds a pcboard 12.0 pcboard.sys file, some but not
all of the users structure information will be available.
Each member of the users scructure is marked to indicate what is available
and what is not depending on the things just mentioned.
Warranty
Warranty
~~~~~~~~~~~~
I make no warranty of any kind, express or implied, including
without limitation, any warranties of merchantability and/or
fitness for a particular purpose. I shall not be held liable for
any damages, whether direct, indirect, special or consequential
arising from a failure of this program to operate in the manner
desired by the user. I shall not be held liable for any damage to
data or property which may be caused directly or indirectly by the
use of this program.
In no event will I be held liable for any damages, including (but
not limited to) any lost profits, lost savings or other incidental
or consequential damages arising out of the use or inability to
use this program, or for any claim by any other party.
This warranty is governed by the laws of the State of Tennessee.
RELEASE HISTORY
~~~~~~~~~~~~~~~~~~~
01-May-90 v1.0
Initial BETA testing as CKIT10ß.ZIP
Beta 1.0 release. The next release of CKIT, I predict, should have
about a 15% to 20% reduction in code size. If you find any problems
with CKIT, please contact me at the phone numbers/address above.
01-Jun-90 v1.0
Release of version 1.0
13-Jun-90 v1.0
Release of version 1.0A
Added library support for TURBO C. Added wait function.
Minor documention fixes.
16-Jun-90 v1.0
Release of version 1.0B
Fixed a minor error in the TURBOC small library. I had
left a INCLUDELIB in the code by mistake and you were
forced to use the /N Tlink switch. This has been corrected
and the use of /n is no longer needed.
20-Jun-90 v1.0
Release of version 1.0C
Fixed another minor problem where the assembler I used had
converted all my functions to uppercase in the .obj file.
I thought the default was to not do that but as it turns out
it wasn't. Now all the library function names/variables are
the right case.
25-Jun-90 v1.05
Release of version 1.05
Added support for 16550AN UART. The code will take advantage
of 16550AN chip if present. Added caller log function.
Begin including the medium library with Zip. This was done
because of the self-registering feature. Took out time limit
that CKIT originally had. Future releases will not have any
limitations.
25-Jul-90 v1.1
Release of version 1.1
This release was a little premature. I went ahead and released
it since it did fix a couple of problems. * indicates a new
feature.
Display_file() -
a. It will now put a space before the filename when it reports a
problem.
b. The EOF is no longer displayed.
c. display_file() will now correctly display text files that have ANSI
codes embedded in the file.
d. CTRL-K now works on the local keyboard. (The remote keyboard was OK)
* e. display_file() will now return TRUE/FALSE to indicate whether a
problem had occured. You can then check the C global variable
_errno for cause of error.
* f. Fixed problem when user.page_length was equal to 0. See the
CKIT.DOC for hints on how to take advantage of this feature.
2. display_time() - Would not update to the time used until after
two carriage returns were entered. fixed
3. input()
a. Control characters or any non-displayable characters below 1F hex
will not increase the counter. This corrects the problem of being
able to backspace too far and erasing the prompts.
* b. Each call to input() now will purge the buffer into which you wish
to place keyboard input. You should no longer have to include the
statement memset(buffer, 0, 21) before calling input().
* c. A new function purge_buffer will purge any buffer to NULLS by
passing a pointer to the buffer and the size of the buffer.
i.e purge_buffer(buffer, 0x80).
This may or may not be useful but is available.
NOTE: There is a separate purge function for the serial port input
buffer if you wish to purge it before calling input.
See CKIT.DOC
* d. New function available called check_keypress. Checks for any
specific ASCII character.
This function will return TRUE/FALSE as defined in CKIT.DOC.
* e. Another new function called check_CR will check for a carriage
return and return TRUE/FALSE.
4. get_nextpar() - Would only accept 2 stacked commands, fixed.
While working on the get_nextpar() function, I went ahead and targeted
it for some optimization along with the get_cmdline() function.
The results are:
get_nextpar() is now smaller and 7% faster.
get_cmdline() is now smaller and 45% faster.
Overall, with all the corrections and added functions the .obj file for
CKIT is now 2% SMALLER than before.
11-Aug-90 v1.5
Release of version 1.5
Ckit is now compatible with PCBoard version 12.0, 14.x-14.5, GAP
BBS, and other BBS systems using the standard door.sys file.
The level of compatiblity is up to the door author and the type
of information needed. There is a lot of information available,
but by keeping this to a minimum, the door author can write his
door to be compatible with all the systems above with no extra
instructions to the user of the door except for the PCBoard
sysop to use either pcboard.sys or door.sys. (Version 12.0
would have to use pcboard.sys and all others use door.sys.)
CKIT will automatically determine which file to read and which
PCBoard version is in use. See the compatiblity section in this
doc file for more information and a Variables Quick-Reference.
Added more features and cosmetics to the program's status line
for the sysop's use...
F8 - Return user to BBS. This was always there, I just
forgot to document it. :)
F5 - Shell to DOS
ALT-X - Sets the PCBoard's exit to DOS after caller flag
ALT-N - Sets the PCBoard's sysop on next after caller flag
ALT-H - Display Help Screen on sysop status line, and next
ALT-H will show com port status
Functions added are:
dos_shell(char *) - Allow door author to shell to another program
for execution if desired. See CKIT.DOC
_debug_on(void); - Turns off keyboard timer and other things
while door author is debugging his door.
Additional variables:
short PCB12, expert, parity, *conferences, current_conference,
caller_bday[8], main_dir[15], gen_dir[15], sysop_name[15],
sysop_alias[15], page_length, ansi_ng, default_color[2],
last_dir_scan[8], daily_files[4], total_doors[4],
msgs_left[4], max_files[4], upload_Kbytes[10],
download_Kbytes[10], dload_total[5], upload_total[5]
- Added my own math routine so you no longer have to include
MATH.LIB if you are using TC compiler.
- Reduction of code size by about 20% relative.
13-Aug-90 v1.5A
Release of version 1.5A
I can't believe I did this. After telling everyone to make
sure and not have debug_on in the released versions of their
door, I released CKIT with debug on!. As a result, the
keyboard timer and some other things would not work
properly. This release with a code date 8/13/90 will work
properly.
FUTURE ENHANCEMENTS
~~~~~~~~~~~~~~~~~~~~~~~
- The port addresses used in CKIT for COM1-COM4 use standard port
addressing, 3F8, 2F8, 3E8 and 2E8. The next release will enable
a way of specifying a different port address and irq if needed.
- Support of caller logging along with Goodbye from within door.
- More PCBoard data files as 14.5 progresses
ORDER.FRM
~~~~~~~~~~~~~
Return to: Rickie Belitz
P.O. Box 5895
Maryville, TN 37802-5895
Name ______________________________________________________________
Company ___________________________________________________________
Address ___________________________________________________________
___________________________________________________________
Phone _____________________________________________________________
Register CKIT to: Name____________________________________________
Diskette size: ____ 5.25" acceptable ____ 3.5" required
Total enclosed: __________